#include <iostream>
#include "TcpServer.hpp"

void Usage(const std::string &proc)
{	
	std::cout << "\r\nUsage: " << proc << "Serverport Serverip" << std::endl;
}

int main(int argc, char *argv[])
{
	// std::cout << "main start" << '\n';
	// ./TcpServer port
	if(argc != 2)
	{
		Usage(argv[0]);
		exit(0);
	}
	
	uint16_t Serverport = atoi(argv[1]);
	std::unique_ptr<TcpServer> ts(new TcpServer(Serverport));

	ts->tverinit();

	ts->start();

	return 0;
}
